package com.xuecheng.orders.feignclient;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * 用户管理远程接口
 *
 * @author itcast
 */
@FeignClient(value = "auth-service", fallbackFactory = ContentServiceClientFallbackFactory.class)
public interface AuthServiceClient {

    @GetMapping("/auth/user/getName/{id}")
    String getName(@PathVariable("id") String id);

    @GetMapping("/auth/user/listNameByIds")
    Map<String, String> listNameByIds(@RequestParam("ids") List<String> ids);
}